Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another try at #225.
TL;DR
This change nothing to all actual users of Swaggen. It add the support of splitting the generated code for SPM user only and only if they want to. This is the first step to remove Alamofire. It allow to run generated code on Linux if you only use the request and model targets. And finally it add dynamic library support when using SPM.
What have been done
This PR is focus to mainly focus to split in SPM the generated code into 4 part:
Why
I did these changes because:
Remarks
I don't think this should be another template because it doesn’t change the main template it make it more flexible.
Point of interest to the reviewer
In order to make everything works I have to make
createURLRequest
but it worked with Alamofire so I needed to import the relevant part from Alamofire to make it work.I did copy the Alamofire Timeline file in order to keep the feature.
Todo after review (in order to not clutter the main work of this PR)
I hope it helps.